<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css?t=1525771196163}"  media="all">
    <script th:src="@{/jquery/jquery.min.js}" charset="utf-8"></script>
    <script th:src="@{/layui/layui.js?t=1525771196163}" charset="utf-8"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script th:src="@{/html5shiv/html5.min.js}"></script>
    <script th:src="@{/respond.js/respond.min.js}"></script>
    <![endif]-->
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">AUTOMATION</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item">
                <a href="javascript:;">快捷操作</a>
                <dl class="layui-nav-child">
                    <dd><a onclick="netmarch.ifram_src_add('/admin/index')" >代码生成</a></dd>
                    <dd><a onclick="netmarch.ifram_src_add('design/index')">数据库设计文档生成</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    袁小康
                </a>
                <!--
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
                -->
            </li>
            <!--
                        <li class="layui-nav-item"><a href="">退了</a></li>
                        -->
                    </ul>
                </div>

                <div class="layui-side layui-bg-black">
                    <div class="layui-side-scroll">
                        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">控制台</a>
                    <dl class="layui-nav-child">
                        <dd><a onclick="netmarch.ifram_src_add('/admin/index')">代码生成</a></dd>
                        <dd><a onclick="netmarch.ifram_src_add('design/index')">数据库设计文档生成</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">其他操作</a>
                    <dl class="layui-nav-child">
                        <dd><a onclick="netmarch.ifram_src_add('/index')">生成记录查看</a></dd>
                    </dl>
                </li>
                <!--
                <li class="layui-nav-item"><a href="">云市场</a></li>
                <li class="layui-nav-item"><a href="">发布商品</a></li>
                -->
            </ul>
        </div>
    </div>

    <div class="layui-body" style="overflow:visible">
        <iframe id="iframe" onload="netmarch.setHeight(this)" style="min-height:50px; height:100%;" th:src="@{/admin/index}" width="100%" scrolling="yes" frameborder="0"></iframe>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © 袁小康
    </div>
</div>
<script  th:inline="javascript">

    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
    var netmarch = {
        ifram_src_add:function(url){
            var src=/*[[@{*/url/*}]]*/;
            document.getElementById("iframe").src=src;
        },
        setHeight:function(iframe) {
            //设置iframe自适应高度
            $(iframe).height($(window).height() - $(".layui-footer").height() - $(".layui-header").height())
        }
    };



</script>
</body>
</html>